#!/usr/bin/env python
#coding: utf8


__author__ = 'Исаков Владислав'
__project_name__ = 'isakov-selenium-python'
__date__ = '07.04.14'


def login(driver):
    driver.find_element_by_id("username").clear()
    driver.find_element_by_id("username").send_keys("admin")
    # type | name=password | admin
    driver.find_element_by_name("password").clear()
    driver.find_element_by_name("password").send_keys("admin")
    # click | name=submit |
    driver.find_element_by_name("submit").click()
    assert("My movie collection - php4dvd v2.0", driver.title[1:-1])